// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package com.nnee.p_b.p_b.p_g;

import com.nnee.p_a.p_b.cls_g;
import com.nnee.p_a.p_b.cls_h;
import com.nnee.p_b.p_b.p_e.cls_f;
import com.nnee.p_b.p_b.p_e.cls_k;
import com.nnee.p_c.cls_b;
import com.nnee.p_c.p_b.cls_c;
import com.nnee.p_c.p_b.cls_d;
import com.nnee.p_fk.p_a.cls_m;
import com.nnee.p_pr.p_a.cls_i;
import com.nnee.p_pr.p_c.cls_l;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.Hashtable;
import org.json.JSONException;
import org.json.JSONObject;

// Referenced classes of package com.nnee.b.b.g:
//            c

public class cls_a extends cls_k
{

    protected cls_a(int i1)
    {
        super(i1);
    }

    private cls_m a(String s, String s1, String s2, String s3)
    {
        cls_c c1=null;
        if(!cls_i.e(s3))
        {
            String s5 = com.nnee.p_b.p_b.p_g.cls_c.a().func_a("/statuses/upload.json");
            try
            {
                ArrayList arraylist = new ArrayList();
                arraylist.add(new cls_g("status", s, "utf-8"));
                if(!com.nnee.p_c.cls_b.a(s1))
                    arraylist.add(new cls_g("lat", s1, "utf-8"));
                if(!com.nnee.p_c.cls_b.a(s2))
                    arraylist.add(new cls_g("long", s2, "utf-8"));
                arraylist.add(new com.nnee.p_a.p_b.cls_b("pic", new File(s3)));
                com.nnee.p_a.p_b.cls_a aa[] = new com.nnee.p_a.p_b.cls_a[arraylist.size()];
                arraylist.toArray(aa);
                cls_h h1 = new cls_h(aa);
                //c1 = com.nnee.p_b.p_b.p_g.cls_c.a().b().a(com.nnee.p_fk.p_a.cls_b.bPOST, s5, null, h1);
                c1.b(true);
            }
            catch(FileNotFoundException filenotfoundexception)
            {
                filenotfoundexception.printStackTrace();
                c1 = null;
            }
        } else
        {
            Hashtable hashtable = new Hashtable();
            String s4 = com.nnee.p_b.p_b.p_g.cls_c.a().func_a("/statuses/update.json");
            hashtable.put("status", s);
            if(!com.nnee.p_c.cls_b.a(s1))
                hashtable.put("lat", s1);
            if(!com.nnee.p_c.cls_b.a(s2))
                hashtable.put("long", s2);
            //c1 = com.nnee.p_b.p_b.p_g.cls_c.a().b().a(com.nnee.p_fk.p_a.cls_b.bGet, s4, hashtable);
            c1.a(true);
        }
        return c1;
    }

    public static com.nnee.p_fk.p_b.cls_a a(String s, String s1, String s2, String s3, String s4)
    {
        char c1 = '\u1001';
        if(!cls_i.e(s2))
            c1 = '\u1002';
        cls_a a1 = new cls_a(c1);
        a1.k = s2;
        a1.j = s1;
        a1.l = s3;
        a1.m = s4;
        a1.n = s;
        return a1;
    }

    private void a(String s, String s1)
    {
        //com.nnee.p_b.p_b.p_g.cls_c.a().a(s, s1);
    }

    private boolean a()
    {
        boolean flag = true;
        String as[] = com.nnee.p_pr.p_c.cls_l.c(com.nnee.p_b.p_a.cls_d.h().a(), n, 3);
        if(as != null && as.length == 2 && !cls_i.e(as[0]) && !cls_i.e(as[1]))
            a(as[0], as[1]);
        else
            flag = false;
        return flag;
    }

    private com.nnee.p_b.p_b.p_e.cls_g b(String s)
    {
        com.nnee.p_b.p_b.p_e.cls_g g1 = null;
        com.nnee.p_b.p_b.p_e.cls_g g2 = new com.nnee.p_b.p_b.p_e.cls_g(3);
        try
        {
            g2.a(com.nnee.p_c.cls_b.c((new JSONObject(s)).optString("id")));
        }
        catch(JSONException jsonexception)
        {
            jsonexception.printStackTrace();
            g2 = g1;
        }
        if(g2 == null || !cls_i.e(g2.b()))
            g1 = g2;
        return g1;
    }

    public void a(int i1, String s)
    {
        cls_f f1 = com.nnee.p_b.p_b.p_g.cls_c.a().func_a(i1, s);
        d(f1.h, f1);
    }

    public void a(String s)
    {
        com.nnee.p_b.p_b.p_e.cls_g g1;
        switch(n())
        {
       

        case 4097: 
        case 4098: 
        	g1 = b(s);
        	 if(!o())
                 if(g1 != null)
                     c(0, g1);
                 else
                     d(-1, null);
        	 
        	 break;
        default:
            g1 = null;
            break;
        }
 
    }

    public void c()
    {
//        if(a()) goto _L2; else goto _L1
//_L1:
//        d(-2, null);
//        com.nnee.p_g.cls_b.d("***********", "Error  withou token & secret to send blog");
//_L6:
//        return;
//_L2:
//        n();
//        JVM INSTR tableswitch 4097 4098: default 48
//    //                   4097 73
//    //                   4098 73;
//           goto _L3 _L4 _L4
//_L3:
//        if(o != null && !o())
//        {
//            a(o);
//        } else
//        {
//            d(-4, null);
//            h();
//        }
//        continue; /* Loop/switch isn't completed */
//_L4:
//        o = a(j, l, m, k);
//          goto _L3
//        if(true) goto _L6; else goto _L5
//_L5:
    }

    private static final String a = "/statuses/upload.json";
    private static final String b = "/statuses/update.json";
    private String j;
    private String k;
    private String l;
    private String m;
    private String n;
    private cls_m o;
}
